#ifndef SYSCLIENTHEARTBEAT_H
#define SYSCLIENTHEARTBEAT_H

#include "cnsMacroGlobal.h"
#include "framework.h"
#include "client-socket_global.h"
#include <QThread>
#include <uv.h>
#include "baseproto.h"
#include "client-socket.h"
#include "base.pb.h"

class SysClientHeartbeat : public QObject
{
    Q_OBJECT
public:
    Q_INVOKABLE SysClientHeartbeat();
    static void _on_heartbeat_timer(uv_timer_t* handle);
    Q_INVOKABLE void f__on_connect(CnsComponentPtr com, uv_connect_t* req, int status);
    Q_INVOKABLE void f__on_read(CnsComponentPtr com, cgproto::Message& msg);
};

Q_DECLARE_METATYPE(SysClientHeartbeat*)

#endif // SYSCLIENTHEARTBEAT_H
